CRPEJob::SetFont

Use CRPEJob::SetFont to set the font and font characteristics for the specified section. Use it any time that you want to change a default font at runtime in response to user input, or to specify a built-in printer font.

Syntax
BOOL SetFont (
        short sectionCode,
        short scopeCode,
        const _TCHAR *faceName,
        short fontFamily,
        short fontPitch,
        short charSet,
        short pointSize,
        short isItalic,
        short isUnderlined,
        short isStruckOut,
        short weight );
Parameters

sectionCode

Specifies the section of the report for which you want to set the font. Use one of the PEP_XXX Section Codes Constants.

scopeCode

Specifies whether the font selected is to apply to fields, to text, or to both. To specify both, use the bitwise "Or" operator (|). Use one of the following constants.


Constant Description


PEP_FIELDS

Sets the default font for fields in the report section specified.


PEP_TEXT

Sets the default font for all text (that has not been entered as a text field value) in the report section specified.

faceName

Specifies a pointer to the actual face name of the font that you want to use. The face name you pass can typically come from a font dialog box, be hard coded in the application, or be chosen by the application from the fonts supported on the printer (for example, "Times New Roman").

fontFamily

Specifies the font family for the font that you want to use. Use one of the following constants.


Constant Description


FF_DONTCARE

No font family or family does not matter.


FF_ROMAN

Variable pitch font with serifs.


FF_SWISS

Fixed pitch font without serifs.


FF_MODERN

Fixed pitch font with or without serifs.


FF_SCRIPT

Handwriting-like font.


FF_DECORATIVE

Fancy display font.

fontPitch

Specifies the font pitch that you want to use. Use one of the following constants.


Constant Description


DEFAULT_PITCH

Retains the default pitch for the font.


FIXED_PITCH

Fixed pitch, each character is the same width.


VARIABLE_PITCH

Variable pitch, the width of each character varies.

charSet

Specifies the character set that you want to use. Use one of the following constants.


Constant


ANSI_CHARSET



SYMBOL_CHARSET



HANGEFUL_CHARSET



OEM_CHARSET



DEFAULT_CHARSET



SHIFTJIS_CHARSET



CHINESEBIG5_CHARSET


pointSize

Specifies the desired point size for the selected font. Use 0 to indicate no change.

isItalic

Specifies whether the font selected should be italicized. Use 1 for italics, 0 for no italics, or PEP_UNCHANGED to leave the italics as set up in the report.

isUnderlined

Specifies whether the font should be underlined. Use 1 to underline, 0 for no underline, or PEP_UNCHANGED to leave underline settings as specified in the report.

isStruckOut

Specifies whether the font should appear struck-out. Use 1 for strike-out, 0 for no strike out, or PEP_UNCHANGE to leave strike-out settings as specified in the report.

weight

Specifies the weight of the font. Use one of the following constants.


Constant


FW_DONTCARE


FW_EXTRALIGHT


FW_NORMAL


FW_SEMIBOLD


FW_EXTRABOLD


FW_ULTRALIGHT


FW_DEMIBOLD


FW_BLACK


FW_THIN


FW_LIGHT


FW_MEDIUM


FW_BOLD


FW_HEAVY


FW_REGULAR


FW_ULTRABOLD

Returns


Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com